#include <stdio.h>
int main()
{
	float x,y;
	printf("please input x:");
	scanf("%f",&x); 
	if(x<-3)
    y=1;
	else if(x<=3)
	y=x*x+1;
	else
	y=x-1;
	printf("y=%.2f\n",y);
	 
	return 0;
}
